package com.example.libraryapp.util;

import android.content.Context;

import com.example.libraryapp.R;

/**
 * @author 伍凯铭
 * @since 2020/8/3
 */
public class SexUtil {

    public static final int SECRECY = 0;

    public static final int MAN = 1;

    public static final int WOMAN = 2;

    public static String getSex(Context context, Integer code) {
        if(code == null) {
            return context.getString(R.string.secrecy);
        }
        if(code == WOMAN) {
            return context.getString(R.string.woman);
        }
        if(code == MAN) {
            return context.getString(R.string.man);
        }
        return context.getString(R.string.secrecy);
    }


}
